const state = {
  dialogOuterVisible: false,
  dialogOuter: {
    visible: false
  },
  dialogInnerVisible: false,
  dialogInner: {
    visible: false
  }
}

const mutations = {
  SET_DIALOGOUTER: (state, options) => {
    state.dialogOuter = options
  },
  SET_DIALOGINNER: (state, options) => {
    state.dialogInner = options
  },
  SET_DIALOGOUTERVISIBLE: (state, bool) => {
    state.dialogOuterVisible = bool
  },
  SET_DIALOGINNERVISIBLE: (state, bool) => {
    state.dialogInnerVisible = bool
  }
}

const actions = {
  dialogouter({
    commit
  }, options) {
    commit('SET_DIALOGOUTER', options)
  },
  dialoginner({
    commit
  }, options) {
    commit('SET_DIALOGINNER', options)
  },
  dialogOutervisible({
    commit
  }, bool) {
    commit('SET_DIALOGOUTERVISIBLE', bool)
  },
  dialogInnerVisible({
    commit
  }, bool) {
    commit('SET_DIALOGINNERVISIBLE', bool)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
